home *** CD-ROM | disk | FTP | other *** search
- Attribute VB_Name = "Module1"
- Option Explicit
-
- Declare Function GetShortPathName Lib "kernel32" Alias _
- "GetShortPathNameA" (ByVal lpszLongPath As String, _
- ByVal lpszShortPath As String, ByVal cchBuffer As Long) As Long
-
- Public Function GetDosPath(LongPath As String) As String
-
- Dim s As String
- Dim i As Long
- Dim PathLength As Long
-
- i = Len(LongPath) + 1
-
- s = String(i, 0)
-
- PathLength = GetShortPathName(LongPath, s, i)
-
- GetDosPath = Left$(s, PathLength)
-
- End Function
-
-
-